package com.example.mp_demo.controller;


import com.example.mp_demo.entity.User;
import com.example.mp_demo.service.IUserService;
import com.example.mp_demo.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zgc
 * @since 2022-01-25
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserServiceImpl userService;

    @GetMapping(value = "/queryList")
    public List<User> queryList() {
        return userService.list();
    }
}
